﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminList.aspx.cs" Inherits="Manage_User_AdminList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../images/skin.css" rel="stylesheet" type="text/css" />
    <script src="../js/hoverbg.js" type="text/javascript"></script>
    <script src="../js/common.js" type="text/javascript"></script>
    <script src="../js/lib/jquery1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function goModify() {
            var id = 0;
            $("input[name='ids']").each(function (i) {
                if (this.checked) {
                    id = this.value;
                    return;
                }
            });
            if (id == 0) {
                alert("未选择项目！");
                return false;
            }
            else {
                document.location = "AdminOperate.aspx?act=edit&id=" + id;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="../images/mail_leftbg.gif"><img src="../images/left-top-right.gif" width="17" height="29" /></td>
    <td width="1354" height="29" valign="top" background="../images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">管理帐号</td>
      </tr>
    </table></td>
    <td width="24" valign="top" background="../images/mail_rightbg.gif"><img src="../images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="../images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="5%"><img src="../images/date_go.png" width="16" height="16" /></td>
                    <td width="95%" class="STYLE5"><span class="STYLE6">你当前的位置</span>：[管理员帐号管理]-[管理帐号列表]</td>
                  </tr>
              </table></td>
              <td width="54%"><table border="0" align="right" width="300" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="60" class="STYLE5">
                    <input type="checkbox" id="allCheck" onclick="CheckAll('ids');" />全选
                    </td>
                    <td width="60" class="STYLE5">
                    <input type="checkbox" id="clearCheck" onclick="CheckOther('ids');" />反选
                    </td>
                    <td>
                    <a href="AdminOperate.aspx?act=add"><img src="../images/22.gif" width="14" height="14" align="absmiddle" /> 新增</a>
                    </td>
                    <td>
                    <img src="../images/33.gif" width="14" height="14" align="absmiddle" /> <a href="javascript:void(0);" onclick="goModify()">修改</a>
                    </td>
                    <td>
                    <asp:LinkButton ID="lkbtnBatchDel" runat="server" 
            OnClientClick="return confirm('删除此项，操作无法恢复。\n\n确实要执行吗？');return false;" 
            onclick="lkbtnBatchDel_Click"><img src="../images/11.gif" width="14" height="14" align="absmiddle" /> 删除</asp:LinkButton>
                    </td>
                  </tr>
              </table></td>
            </tr>
          </table>
          <asp:GridView ID="gvDatalist" runat="server" AutoGenerateColumns="False" align="center" CellPadding="0" CellSpacing="1" BackColor="#C5D5E4" onMouseOver="changeto()"  onmouseout="changeback()"
            CssClass="maintop list" GridLines="None" Width="600px" EmptyDataText="暂无有效内容" EmptyDataRowStyle-BackColor="#ffffff" EmptyDataRowStyle-ForeColor="#777777" EmptyDataRowStyle-HorizontalAlign="Center">
            <Columns>            
                <asp:TemplateField HeaderText="选择/ID">
                    <HeaderStyle CssClass="listtitle" Wrap="false"/>
                    <ItemStyle Wrap="false" />   
                    <ItemTemplate>
                    <input type="checkbox" id="ids" name="ids" value="<%# Eval("AdminID").ToString() %>" /><%# Eval("AdminID").ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="帐号名" DataField="AdminName" HeaderStyle-CssClass="listtitle" />
                <asp:CheckBoxField HeaderText="是否被锁" DataField="isLocked" HeaderStyle-CssClass="listtitle" ItemStyle-HorizontalAlign="Center" />
                <asp:TemplateField HeaderText="操作">
                    <HeaderStyle CssClass="listtitle" Wrap="false"/>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemStyle Wrap="false" />
                    <ItemTemplate>
                        <a href="AdminOperate.aspx?act=edit&id=<%# Eval("AdminID").ToString() %>"><span class="STYLE8"><img src="../images/edt.gif" width="16" height="16" align="absmiddle" />编辑</span></a>
                        &nbsp;&nbsp;<a href="AdminList.aspx?act=del&id=<%# Eval("AdminID").ToString() %>" onclick="return confirm('删除此项，操作无法恢复。\n\n确实要执行吗？');return false;" ><span class="STYLE8"><img src="../images/del1.gif" width="16" height="16" align="absmiddle" />删除</span></a>
                    </ItemTemplate>  
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
            <div style="text-align:right;" class="STYLE10"><asp:Literal ID="ltPage" runat="server"></asp:Literal></div>

          </td>
      </tr>
    </table></td>
    <td background="../images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="../images/mail_leftbg.gif"><img src="../images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="../images/buttom_bgs.gif"><img src="../images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="../images/mail_rightbg.gif"><img src="../images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>
